import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './assets/fonts/iconfont.css'
import './assets/js/rem'
import './assets/css/back.css'

import {
  Tabbar, TabbarItem, Icon, Swipe,
  SwipeItem, Grid, GridItem, List, PullRefresh, NavBar,
  GoodsAction, GoodsActionIcon, GoodsActionButton, Popup,
  Card, Stepper, Button, Loading, Form, Field, Toast, Divider,
  SwipeCell, Checkbox, CheckboxGroup, SubmitBar, ContactCard,
  CellGroup, Cell, Switch, Dialog,
  Area, AddressList, CouponCell, CouponList, Lazyload, PasswordInput, NumberKeyboard
} from 'vant'
import $loading from './plugins/loading'
Vue.use($loading)

Vue.use(Tabbar)
  .use(TabbarItem)
  .use(Icon)
  .use(Swipe)
  .use(SwipeItem)
  .use(Grid)
  .use(GridItem)
  .use(List)
  .use(PullRefresh)
  .use(NavBar)
  .use(GoodsAction)
  .use(GoodsActionIcon)
  .use(GoodsActionButton)
  .use(Popup)
  .use(Card)
  .use(Stepper)
  .use(Button)
  .use(Loading)
  .use(Form)
  .use(Field)
  .use(Toast)
  .use(Divider)
  .use(SwipeCell)
  .use(Checkbox)
  .use(CheckboxGroup)
  .use(SubmitBar)
  .use(ContactCard)
  .use(CellGroup)
  .use(Cell)
  .use(Switch)
  .use(Area)
  .use(AddressList)
  .use(Dialog)
  .use(CouponCell)
  .use(CouponList)
  .use(PasswordInput)
  .use(NumberKeyboard)
  .use(Lazyload, {
    // import运行在编译之前编译后无assets路径地址会错 图片引入方法
    Loading: require('../src/assets/img/213017-1585229417b44e.jpg'),
    console: require('./assets/img/213246-1586525566c099.jpg'),
    preload: 1,
    attempt: 3
  })

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
